/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ChateoController;

import java.net.InetAddress;

/**
 *
 * @author adrian
 */
public class User {
    private InetAddress addr;
    private String login;
    private boolean loggedIn;
    
    public User(InetAddress addr , String login){
        this.addr=addr;
        this.login=login;
        loggedIn=false;        
        
    }
    public User(InetAddress addr1, String login1, boolean state){
        this.addr=addr1;
        this.login=login1;
        this.loggedIn=state;
    }

    public InetAddress getAddr() {
        return addr;
    }

    public String getLogin() {
        return login;
    }

    public boolean isLoggedIn(){
        return loggedIn;
    }

    public void setAddr(InetAddress addr) {
        this.addr = addr;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    
    public void setLoggingState(boolean loggedIn){
        this.loggedIn=loggedIn;
    }
    
    
    @Override
    public String toString(){
        String out="";
         if (Controller.DebugMode()){
            out = ("login "+login+"("+addr+")");
        }
        else
        {
            out = (login);
        }
        return out;
        
    }
    
}